import request from '@/utils/request'
export function advertisingList(data) { // 列表
  return request({
    url: '/cms/location',
    method: 'get',
    params: data
  })
}
export function addAdvert(data) { // 添加广告
  return request({
    url: '/cms/location',
    method: 'post',
    data: data
  })
}
export function changeOnine(id) { // 改变上下架
  return request({
    url: '/cms/location/' + id,
    method: 'put'
  })
}

export function updateAdvert(data) {
  return request({
    url: '/cms/location',
    method: 'put',
    data: data
  })
}
export function searchId(id) {
  return request({
    url: '/cms/location/' + id,
    method: 'get'
  })
}
export function searchSite(val) {
  return request({
    url: '/cms/location/number/' + val,
    method: 'get'
  })
}
export function delAdvert(id) {
  return request({
    url: '/cms/location/' + id,
    method: 'delete'
  })
}
export function serachData(data) {
  return request({
    url: '/cms/location',
    method: 'get',
    params: data
  })
}
